<?$path = $_SERVER['REQUEST_URI'];
/*Top menu&right menu  Активный пункт*/
$firstlis="url('../pictures/li.png') no-repeat scroll 0px -28px transparent";
$other="url('../pictures/li.png') no-repeat scroll 0px -30px transparent";
if ($path == '/map/maps') {$active=4; $punkt = " $('#div4').css('background',\"url('../pictures/li.png') no-repeat scroll 0px -30px transparent\"); $('.first-menu').addClass('selected1');";}
if ($path == '/map') {$active=5; $punkt = "$('#div5').css('background',\"url('../pictures/li.png') no-repeat scroll 0px -30px transparent\"); $('.center-menu').addClass('selected2');";}
if ($path == '/page/4') {$active=6; $punkt = "$('#div6').css('background',\"url('../pictures/li.png') no-repeat scroll 0px -30px transparent\"); $('.last-menu').addClass('selected3');";}
if ($path =='/report')  {$active=7; $punkt = "$('#div7').css('background',\"url('../pictures/li.png') no-repeat scroll 0px -30px transparent\"); $('.last-menu').addClass('selected3');";}
if (isset($punkt)) echo "<script>$(document.body).ready(function(){" .$punkt."});</script>";
if ($path == '/'):?>
<script>$(document.body).ready(function(){$('#div1').css('background',"<?=$firstlis?>");});</script>
<?endif;?>
<?if ($path == '/login'):?>
<script>$(document.body).ready(function(){$('#div2').css('background',"<?=$firstlis?>");});</script>
<?endif;?>
<?if ($path == '/register'):?>
<script>$(document.body).ready(function(){$('#div3').css('background',"<?=$firstlis?>");});</script>
<?endif;?>


<?/*Right menu hover*/?>
<!--Hover-->
<script>
    $(document.body).ready(function(){

        for (var i=0;i<8;i++)
        {
            var div="#div"+i;
                      if (i<5)
                     {    /*Чтобы у активной ссылки не пропадал бекграунд при наведении*/
                        <?if (isset($active)):?>
                          if(i==<?=$active;?>)continue;
                        <?endif;?>


                                $(div).mouseover(function(){
                                $(this).css("background", "url('../pictures/li.png') no-repeat scroll 0px -30px transparent");
                                });
                                $(div).mouseout(function(){
                                 $(this).css("background", "none");
                                });

                    }

                     else
                      {

                        <?if (isset($active)):?>
                          if(i==<?=$active;?>)continue;
                        <?endif;?>


                            $(div).mouseover(function(){
                                $(this).css("background", "url('../pictures/li.png') no-repeat scroll 0px -30px transparent");
                                });
                                $(div).mouseout(function(){
                                 $(this).css("background", "none");
                                });





                      }


        }
 $('form').attr('autocomplete','off');
 if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
$(window).load(function(){
    $('input:-webkit-autofill').each(function(){
        var text = $(this).val();
        var name = $(this).attr('name');
        $(this).after(this.outerHTML).remove();
        $('input[name=' + name + ']').val(text);
    });
});}
    });
</script>